#include "board_desc.h"

const T_GPIO_INFO g_gpio_sets[] = 
{
    //.gpio_pins[引脚名]     = { 组,              物理地址,   引脚虚拟地址,                                有效电平,       输入输出,   中断类型,           上下拉			是否复用,       是否支持重配置    },
	[BEEP_PIN]         	  = { GROUP_GPIOF,     8,   GPIO_VIRTUAL_ADDR(GROUP_GPIOF,   8),     GPIO_HIGH,   		 OUTPUT,   	 	 PULL_DOWN, 	NO_IRQ,       		NOMULTI,    NOT_RECONFIG },
	[LED_GREEN_PIN]       = { GROUP_GPIOF,     9,   GPIO_VIRTUAL_ADDR(GROUP_GPIOF,   9),     GPIO_HIGH,   		 OUTPUT,   	 	 PULL_UP, 		NO_IRQ,       		NOMULTI,    NOT_RECONFIG },
	[LED_RED_PIN]         = { GROUP_GPIOF,    10,   GPIO_VIRTUAL_ADDR(GROUP_GPIOF,  10),     GPIO_HIGH,   		 OUTPUT,   	 	 PULL_UP, 		NO_IRQ,       		NOMULTI,    NOT_RECONFIG },
	[KEY0_PIN]            = { GROUP_GPIOE,     4,   GPIO_VIRTUAL_ADDR(GROUP_GPIOE,   4),     INVALID_GPIO_NUM,   INPUT,   	     PULL_UP, 		IRQ_FALLING,        NOMULTI,    NOT_RECONFIG },
	[KEY1_PIN]            = { GROUP_GPIOE,     3,   GPIO_VIRTUAL_ADDR(GROUP_GPIOE,   3),     INVALID_GPIO_NUM,   INPUT,   	 	 PULL_UP, 		IRQ_FALLING,        NOMULTI,    NOT_RECONFIG },
	[KEY2_PIN]            = { GROUP_GPIOE,     2,   GPIO_VIRTUAL_ADDR(GROUP_GPIOE,   2),     INVALID_GPIO_NUM,   INPUT,   	 	 PULL_UP, 		IRQ_FALLING,        NOMULTI,    NOT_RECONFIG },

	[WAKE_UP_PIN]         = { GROUP_GPIOA,     0,   GPIO_VIRTUAL_ADDR(GROUP_GPIOA,   0),     INVALID_GPIO_NUM,   INPUT,   	 	 PULL_DOWN, 	IRQ_RISING,         NOMULTI,    NOT_RECONFIG },
	[WS2812_DI]           = { GROUP_GPIOA,     6,   GPIO_VIRTUAL_ADDR(GROUP_GPIOA,   6),     INVALID_GPIO_NUM,   AFMOD,   	 	 PULL_UP, 		NO_IRQ,         	NOMULTI,    NOT_RECONFIG },
	[WS2812_OUT]          = { GROUP_GPIOA,     7,   GPIO_VIRTUAL_ADDR(GROUP_GPIOA,   7),     INVALID_GPIO_NUM,   AFMOD,   	 	 PULL_UP, 		NO_IRQ,         	NOMULTI,    NOT_RECONFIG },
};


const T_MCU_IRQ_MAPPING g_irq_mappings[] = {
	{KEY0_PIN_IRQ,            KEY0_PIN},	
	{KEY1_PIN_IRQ,            KEY1_PIN},
    {KEY2_PIN_IRQ,            KEY2_PIN},
    {WAKE_UP_PIN_IRQ,         WAKE_UP_PIN},
};

#if 0

const ez_adc_dev_t g_adc_sets[] = {
  //[ADC名]              = { PIN脚序列号,     ADC通道  ,, port号，采样模式，采样频率},
  	[BAT_ID_ADC]        = { 8, 8, 0, 0, 340},  
    //[NTC_ADC]           = { 9, 9, 0, HOSAL_ADC_ONE_SHOT, 340},   
};

const ez_pwm_dev_t g_pwm_sets[] = {
  //[PWM名]                             = { PIN脚序列号, 占空比，频率，port号 },
    [HEARTING_FILM_PWM]                = { 2, 50, 1000, 2 },
};


                           //= {SCL脚, SDA脚，频率  , port号， 地址宽度， 主从机模式 },
const ez_i2c_dev_t g_i2c_set = { 10, 11, 100000, 0, HOSAL_I2C_ADDRESS_WIDTH_7BIT, HOSAL_I2C_MODE_MASTER};
                           
                               //= { 周期, 是否自动重载，port号 },
const ez_timer_dev_t g_timer_set = {1000*1000, 1, 0 };

#endif



